package com.nbufe.chain;

/**
 * @Author Zan
 * @Create 2024/6/17 8:29
 * @ClassName: Client
 * @Description : TODO 请用一句话描述该类的功能
 */
public class Client {
    public static void main(String[] args) {

        LeaveRequest leaveRequest = new LeaveRequest(29, "张三", "结婚了，请个假");

        Director director = new Director();

        Manager manager = new Manager();
        director.setNextHandler(manager);

        DeputyGeneralManager deputyGeneralManager = new DeputyGeneralManager();
        manager.setNextHandler(deputyGeneralManager);

        GeneralManager generalManager = new GeneralManager();
        deputyGeneralManager.setNextHandler(generalManager);

        director.submit(leaveRequest);
    }
}
